package 老师和学生02;

public class Demo {
    public static void main(String[] args) {
        Teacher t=new Teacher();
        t.setName("姜恒星");
        t.setAge(20);
        System.out.println(t.getName()+","+t.getAge());
        t.teach();
        Teacher t1=new Teacher("姜恒星",20);
        System.out.println(t1.getName()+","+t1.getAge());
        t1.teach();

        Student s=new Student();
        s.setName("张三");
        s.setAge(10);
        System.out.println(s.getName()+","+s.getAge());
        s.study();
        Student s1=new Student("张三",10);
        System.out.println(s1.getName()+","+s1.getAge());
        s1.study();



    }
}
